﻿@model trangbaocao.Models.DeviceModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span align="right"><a href="@Url.Action("Index", "Device")">Quay lại</a></span></h2>                        
                <div class="module-body">
                @using (Html.BeginForm("EditDevice", "Device", FormMethod.Post, new { id = "EditDevice" }))
                {                      
                    <div align="center">
                        <h3>SỬA THÔNG TIN THIẾT BỊ</h3>
                        <div class="account" align="center"> 
                            <img src="@Url.Content("~/Content/Body/Images/Body_Images/Edit_Device.png")" width="12%" />
                        </div>
                    </div>
                    if (TempData["msg"] != null)
                    {                            
                        <span class="notification n-error">@TempData["msg"]</span>
                    }
                <p style="width:25%; float:left"></p>
            <table>
                <div style="width:50%; text-align:center; float:left">          
                    <p align="center">
                        <label style="width:55%; text-align:left;">Tên thiết bị:</label>
                            <div class="thietbi" align="center" style="padding-left: 10px; width: 100%">
                                @Html.TextBoxFor(model => model.name, new { @name = "name", @class = "input-medium" }) 
                                <font color="red">(*)</font>
                                <label style="width:60%; text-align:left;">
                                @Html.ValidationMessageFor(model => model.name)
                                </label> 
                            </div>                                            
                    </p>
                            
                    <p align="center">
                        <label style="width:55%; text-align:left;">Loại thiết bị:</label>
                        @if (Model.loai_tb_id != null)
                        {                            
                            @Html.DropDownListFor(x => x.sort_device_id, Model.loai_tb_id, new { @disabled = "disabled" })
                            @Html.HiddenFor(x => x.sort_device_id)
                        }
                        @*<label>@Html.ValidationMessageFor(model => model.nsx_id)</label>  *@  
                    </p>
                    <p align="center">
                        <label style="width:55%; text-align:left;">Nhà sản xuất:</label>
                        @if (Model.nsx_id != null)
                        {
                            @Html.DropDownListFor(x => x.manufactorys_id, Model.nsx_id, new { @disabled = "disabled" })
                            @Html.HiddenFor(x => x.manufactorys_id)
                        }
                        @*<label>@Html.ValidationMessageFor(model => model.nsx_id)</label>  *@  
                    </p>
                    <p align="center">
                        <label style="width:55%; text-align:left;">Mô tả thiết bị:</label>
                        @Html.TextBoxFor(model => model.mo_ta_thiet_bi, new { @name = "mo_ta_thiet_bi", @class = "input-medium" })
                        @*<label>@Html.ValidationMessageFor(model => model.mo_ta_thiet_bi)</label>*@
                    </p>
                    <p align="center">
                        <label style="width:55%; text-align:left;">Ghi chú:</label>
                        @Html.TextBoxFor(model => model.ghi_chu, new { @name = "ghi_chu", @class = "input-medium" })
                        @*<label>@Html.ValidationMessageFor(model => model.ghi_chu)</label>*@
                    </p> 
                </div>
            </table>                
                    <div class="button" align="center" >
                        <p style="text-align:left; width:26%">
                            <input class="submit-green" type="submit" value="Sửa" /> 
                            <input class="submit-gray" type="reset" value="Hủy" />
                            @*<input class="submit-gray" type="button"  onclick="location.href='@Url.Action("Index", "User")'" value="Quay lại" />*@
                        </p>
                    </div> 
                }
                </div> <!-- End .module-body -->
        </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->